package com.sam.chat.service.impl;

import com.sam.chat.entity.ChatUserDao;
import com.sam.chat.entity.TrackDao;
import com.sam.chat.mapper.ChatUserMapper;
import com.sam.chat.mapper.TrackMapper;
import com.sam.chat.service.ITrackService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author sam
 * @since 2023-04-11
 */
@Service
public class TrackServiceImpl extends ServiceImpl<TrackMapper, TrackDao> implements ITrackService {
    @Autowired
    private TrackMapper trackMapper;
    @Override
    public boolean insertInfo(String phoneName, String location) {
        TrackDao trackDao = new TrackDao();
        trackDao.setPhoneName(phoneName);
        trackDao.setLocation(location);
        int result = trackMapper.insert(trackDao);
        return result == 1;
    }
}
